/*++

Copyright (C) Microsoft Corporation, All Rights Reserved

Module Name:

    SensorDdi.h

Abstract:

    This module contains the type definitions for the 
    ISensorDriver interface which is used by the Sensor Class Extension.
--*/

#pragma once

class CSensorDdi : 
    public CComObjectRoot,
    public ISensorDriver
{
public:
    CSensorDdi();
    virtual ~CSensorDdi();

    DECLARE_NOT_AGGREGATABLE(CSensorDdi)

    BEGIN_COM_MAP(CSensorDdi)
        COM_INTERFACE_ENTRY(ISensorDriver)
    END_COM_MAP()

//
// COM Interface methods
//
public:

    // ISensorDriver methods.
    HRESULT STDMETHODCALLTYPE OnGetSupportedSensorObjects(
        __out IPortableDeviceValuesCollection** ppSensorObjectCollection
        );

    HRESULT STDMETHODCALLTYPE OnGetSupportedProperties(
        __in  LPWSTR pwszObjectID,
        __out IPortableDeviceKeyCollection** ppSupportedProperties
        );

    HRESULT STDMETHODCALLTYPE OnGetSupportedDataFields(
        __in  LPWSTR pwszObjectID,
        __out IPortableDeviceKeyCollection** ppSupportedDataFields
        );

    HRESULT STDMETHODCALLTYPE OnGetSupportedEvents(
        __in  LPWSTR pwszObjectID,
        __out GUID** ppSupportedEvents,
        __out ULONG* pulEventCount
        );

    HRESULT STDMETHODCALLTYPE OnGetProperties(
        __in  IWDFFile* pClientFile,
        __in  LPWSTR pwszObjectID,
        __in  IPortableDeviceKeyCollection* pProperties,
        __out IPortableDeviceValues** ppPropertyValues
        );

    HRESULT STDMETHODCALLTYPE OnGetDataFields(
        __in  IWDFFile* pClientFile,
        __in  LPWSTR pwszObjectID,
        __in  IPortableDeviceKeyCollection* pDataFields,
        __out IPortableDeviceValues** ppDataValues
        );

    HRESULT STDMETHODCALLTYPE OnSetProperties(
        __in  IWDFFile* pClientFile,
        __in  LPWSTR pwszObjectID,
        __in  IPortableDeviceValues* pPropertiesToSet,
        __out IPortableDeviceValues** ppResults
        );

    HRESULT STDMETHODCALLTYPE OnClientConnect(
        __in IWDFFile* pClientFile,
        __in LPWSTR pwszObjectID
        );

    HRESULT STDMETHODCALLTYPE OnClientDisconnect(
        __in IWDFFile* pClientFile,
        __in LPWSTR pwszObjectID
        );

    HRESULT STDMETHODCALLTYPE OnClientSubscribeToEvents(
        __in IWDFFile* pClientFile,
        __in LPWSTR pwszObjectID
        );

    HRESULT STDMETHODCALLTYPE OnClientUnsubscribeFromEvents(
        __in IWDFFile* pClientFile,
        __in LPWSTR pwszObjectID
        );

    HRESULT STDMETHODCALLTYPE OnProcessWpdMessage(
        __in IUnknown* pUnkPortableDeviceValuesParams,
        __in IUnknown* pUnkPortableDeviceValuesResults
        );

// Private data members.
private:
    WpdObjectProperties m_properties;

};


